package com.dms.modules.community.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dms.modules.community.dto.CommunityFollowDTO;
import com.dms.modules.community.entity.CommunityFollow;

public interface CommunityFollowService extends IService<CommunityFollow> {
    
    /**
     * 关注用户
     */
    boolean followUser(Long userId, Long followedUserId);
    
    /**
     * 取消关注用户
     */
    boolean unfollowUser(Long userId, Long followedUserId);
    
    /**
     * 获取关注列表
     */
    IPage<CommunityFollowDTO> getFollowingList(Long userId, Page<CommunityFollowDTO> page);
    
    /**
     * 获取粉丝列表
     */
    IPage<CommunityFollowDTO> getFollowerList(Long userId, Page<CommunityFollowDTO> page);
    
    /**
     * 检查是否已关注
     */
    boolean checkIsFollowed(Long userId, Long followedUserId);
} 